﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="DependencyObjectCollection.cs" company="JDML Consulting Ltd.">
//   Copyright 2011 Photon Project - http://photon.codeplex.com
// </copyright>
// <summary>
//   Defines the DependencyObjectCollection type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Photon.Windows
{
    using System.Collections.Specialized;
    using System.Windows;

#if !SILVERLIGHT

    public class DependencyObjectCollection<T> : FreezableCollection<T> where T : DependencyObject
    {
        public event NotifyCollectionChangedEventHandler CollectionChanged
        {
            add { ((INotifyCollectionChanged)this).CollectionChanged += value; }
            remove { ((INotifyCollectionChanged)this).CollectionChanged -= value; }
        }
    }

#else

    public class DependencyObjectCollection<T> : System.Windows.DependencyObjectCollection<T>
    {
        protected void WritePreamble()
        {
        }

        protected void WritePostscript()
        {
        }
    }

#endif

}
